package com.aaa.product.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.aaa.product.dao.ShoppingCartMapper;
import com.aaa.product.entity.ShoppingCart;
import com.aaa.product.service.ShoppingCartService;

@Service
public class ShoppingCartServiceImpl extends ServiceImpl<ShoppingCartMapper, ShoppingCart> implements ShoppingCartService {

    @Resource
    ShoppingCartMapper shoppingCartMapper;

    public List<ShoppingCart> selectByPhone(String phone) {
        return shoppingCartMapper.selectByPhone(phone);
    }

    public Integer nodup(String phone, String tid) {
        return shoppingCartMapper.nodup(phone,tid);
    }

    //购物车里的商品数量加一
    public boolean countAdd(String phone, String tid) {
        return shoppingCartMapper.countAdd(phone,tid);
    }


}

